﻿<?php
	if( isset($_POST["name"]) && isset($_POST["password"]) )
	{
		$name = $_POST["name"];
		$password = $_POST["password"];
		
		include ("../DB/Connect.php");
		
		$query = "select * from userInfo where name = '$name' and password = '$password'";
		if( !$db -> getData($query) )
			die($db -> error);
		
		$res = $db -> res;
		
		if( isset( $res[0]["name"] ) )
		{
			if( $res[0]["active"] )
				echo "ok";
			else
				echo "not active";
		}
		else
		{
			echo "no" ;
		}
		
		$db -> close();
	}
	else
	{
		echo "kidding";
	}
?>